package com.gem.service.impl;

import com.gem.domain.CompanyContact;
import com.gem.mapper.CompanyContactMapper;
import com.gem.service.CompanyContactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: 玲
 * @Description:
 * @create 2019-10-24 21:05
 * @Modified By:
 */
@Service
@SuppressWarnings("all")
@Transactional(rollbackFor=Exception.class)
public class CompanyContactServiceImpl implements CompanyContactService {

    @Autowired
    private CompanyContactMapper mapper;


    @Override
    public List<CompanyContact> findAllCon() {
        return mapper.findAllCon();
    }

    @Override
    public List<CompanyContact> findAll(Integer coContactCompanyId) {
        return mapper.findAll(coContactCompanyId);
    }

    @Override
    public CompanyContact findById(Integer coContactId) {
        return mapper.findById(coContactId);
    }

    @Override
    public Integer save(CompanyContact companyContact) {
        return mapper.save(companyContact);
    }

    @Override
    public Integer update(CompanyContact companyContact) {
        return mapper.update(companyContact);
    }

    @Override
    public Integer deleteById(Integer coContactId) {
        return mapper.deleteById(coContactId);
    }

    @Override
    public Integer deleteAll(int[] coContactIds) {
        return mapper.deleteAll(coContactIds);
    }

    @Override
    public CompanyContact selectConByName(String coContactName) {
        return mapper.selectConByName(coContactName);
    }

    @Override
    public List<CompanyContact> findAllByUid(Integer coContactCompanyId, Integer uid) {
        return mapper.findAllByUid(coContactCompanyId,uid);
    }
}
